﻿@using OA.Controllers
@{
    ViewBag.Title = "Home Page";
}


<div class="logo">
    <div class="form-horizontal">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">账号</label>
            <div class="col-sm-10">
                <input type="email" class="form-control" id="inputEmail3" placeholder="账号">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" id="inputPassword3" placeholder="密码">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 记住密码
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">登陆</button>
            </div>
        </div>
    </div>
</div>
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script>
    
    $(function() {
        $(".btn-default").click(function() {
            var account = $("#inputEmail3").val();
            var psw = $("#inputPassword3").val();

            $.ajax({
                url: '/logo/login',
                type:"post",
                data: {
                    username: account,
                    password: psw
                },
                success:function(data) {
                    console.log(data.Message);
                }
            })
        })
    })
</script>